<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>demo</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    html, body {
      height: 100%;
    }

    #app {
      height: 100%;
      padding-bottom: 50px;
      box-sizing: border-box;
    }

    .nav {
      height: 50px;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      border-top: 1px solid #eee;
      box-sizing: border-box;
      background: burlywood;
      display: flex;
      justify-content: space-around;
      align-items: center;
    }

    .nav-btn {
      padding: 4px 20px;
    }
    .nav-btn--primary {
      background: brown;
    }
    .nav-btn--info {
      background: cadetblue;
    }
    .nav-btn--default {
      background:darkorange;
    }

    #wrap {
      height: 50%;
      background:cornflowerblue;
      transform: translate(0);
    }

    .fixed {
      position: fixed;
      bottom: 70px;
      right: 20px;
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="wrap" class="wrap">
      parent

      <button class="nav-btn nav-btn--default fixed">create</button>
    </div>

    <div class="nav">
      <button id="btn_set" class="nav-btn nav-btn--primary">设置tranform</button>
      <button id="btn_unset" class="nav-btn nav-btn--info">取消设置tranform</button>
    </div>
  </div>
  <script>
    const btnSet = document.getElementById("btn_set");
    const btnUnset = document.getElementById("btn_unset");
    const wrap = document.getElementById("wrap");
    btnSet.addEventListener("click", function(e) {
      wrap.style.transform = "translate(0)";
    });
    btnUnset.addEventListener("click", function(e) {
      wrap.style.transform = "none";
    });
  </script>
</body>
</html>